package com.xnyzc.lhy.order.feign.fallback.amap;

import com.alibaba.fastjson.JSON;
import com.xnyzc.lhy.order.entity.common.gps.GpsHistoryInfo;
import com.xnyzc.lhy.order.entity.order.OaDOrder;
import com.xnyzc.lhy.order.feign.amap.IAmapService;
import com.xnyzc.lhy.resource.entity.amap.*;
import com.xnyzc.lhy.resource.entity.jpush.BizResult;
import com.xnyzc.lhy.resource.entity.jpush.PushInfoEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Slf4j
@Service
public class AmapServiceFallback implements IAmapService {

    @Override
    public String getRegeo(String location) {
        log.error("获取地理逆编码失败!");
        return null;
    }

    @Override
    public Long getAmapTid(AmapTidParam param) {
        log.info("获取猎鹰服务终端ID失败!");
        return 0L;
    }

    @Override
    public Long getAmapTid(String serviceId, Long userId, String clientId, String tag) {
        log.info("获取猎鹰服务终端ID失败!");
        return 0L;
    }

    @Override
    public Long getAmapGpdId(AmapGpsIdParam param) {
        log.info("获取猎鹰服务轨迹ID失败!");
        return 0L;
    }

    @Override
    public Long getAmapGpdId(String sid, String tid) {
        return null;
    }

    @Override
    public Double getDistance(String startLng, String startLat, String endLng, String endLat) {
        log.info("获取两点之间距离失败!");
        return 0.0;
    }

    @Override
    public HashMap<String, String> getDistanceAndDuration(String startPoint, String endPoint) {
        log.info("获取点位之间的时间与里程失败!");
        return new HashMap<>();
    }

    @Override
    public Map<String, Integer> getStrategy(String startPoint, String endPoint) {
        log.info("获取点位之间的时间与里程失败!");
        return new HashMap<>();
    }

    @Override
    public AmapGouldHistoryGps getHistoryGps(Long serviceId, Long tid, Long gpsId, Long startTime, Long endTime, int page, Integer type) {
        log.info("获取历史轨迹失败!");
        return new AmapGouldHistoryGps();
    }

//    @Override
//    public AmapGouldHistoryGps getHistoryGps(AmapHistoryGpsParam param) {
//        log.info("获取历史轨迹失败!");
//        return new AmapGouldHistoryGps();
//    }

    @Override
    public AmapGouldResult getDistancePoint(String startPoint, String endPoint) {
        log.info("获取里程实体失败!");
        return new AmapGouldResult();
    }

    @Override
    public Integer getLineDistance(String startLng, String startLat, String endLng, String endLat) {
        log.info("获取里程实体失败!");
        return 0;
    }

    @Override
    public Boolean deleteGpsHistorys(Long serviceId, Long tid, Long gpsId) {
        return null;
    }


    @Override
    public Boolean uploadTrack(UploadGpsParam param) {
        log.error("上传轨迹失败参数:[{}]", param);
        return false;
    }

    /**
     * 批量上传点位信息
     *
     * @param param
     * @return
     */
    @Override
    public Boolean uploadTrackFromMongo(OaDOrder oaDOrder) {
        log.error("上传轨迹失败参数:[{}]", oaDOrder);
        return false;
    }

    @Override
    public BizResult pushMessage(PushInfoEntity pushInfoEntity) {
        return null;
    }


}
